import request from "@/utils/request";

//添加单料烟基本信息
export const addTobaccoBasicService = (data) => {
  return request.post("/tobacco/basic", data);
};

//删除单料烟信息
export const delTobaccoService = (data) => {
  return request.delete("/tobacco", { params: data });
};

//修改单料烟备注
export const modifyTobaccoInfoService = (data) => {
  return request.put("/tobacco/info", data);
};

//修改单料烟基本信息
export const modifyTobaccoBasicService = (data) => {
  return request.put("/tobacco/basic", data);
};

//修改单料烟详细信息
export const modifyTobaccoDetailService = (data) => {
  return request.put("/tobacco/detail", data);
};

//单料烟分页查询
export const getTobaccoListService = (data) => {
  return request.get("/tobacco/page", { params: data });
};

//根据id查询单料烟基本信息
export const getTobaccoBasicInfoService = (id) => {
  return request.get("/tobacco/basic", { params: { id } });
};

//根据id查询单料烟详细信息
export const getTobaccoDetailInfoService = (id) => {
  return request.get("/tobacco/detail", { params: { id } });
};

//根据rfid查找单料烟的位置
export const showPlaceService = (data) => {
  return request.post("/tobacco/show", data);
};

//根据rfid查找不足的单料烟
export const tobaccoShortService = (data) => {
  return request.post("/tobacco/short", data);
};
//获取所有不足的单料烟
export const getTobaccoShortService = () => {
  return request.get("/tobacco/short");
};
//获取所有不足的单料烟
export const delTobaccoShortService = (data) => {
  return request.delete("/tobacco/short",{params:data});
};
//单料烟基本数据上传
export const uploadDetaiInfoService = (file) => {
  return request.post("/tobacco/detail/upload", file);
};
//单料烟推荐
export const tobaccoRecommendService = (data) => {
  return request.post("/tobacco/recommend", data);
};
